<template>
    <div class="login-container">
      <h1>登录页面</h1>
      <el-form>
        <el-form-item label="用户名">
          <el-input v-model="username" />
        </el-form-item>
        <el-form-item label="密码">
          <el-input type="password" v-model="password" />
        </el-form-item>
      </el-form>
      <el-button type="primary" @click="handleLogin">登录</el-button>
    </div>
  </template>
  
  <script setup>
  import { ref } from 'vue'
  import { useRouter } from 'vue-router'
  const username = ref('admin')
  const password = ref('123456')
  const router = useRouter()
  const handleLogin = () => {
    router.push('/dashboard')
  }
  </script>